<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex flex-wrap align-center justify-between benben-position-layout flex resultPayment_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center resultPayment_fd0_0' @tap.stop="handleJumpDiy" data-type="back"
					data-url="1">
					<text class='fu-iconfont2  confirmOrder_fd0_0_c0_c0'>&#xE794;</text>
				</view>
				<text class='resultPayment_fd0_1'>我的资料</text>
				<view class='flex flex-wrap align-center resultPayment_fd0_0'>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<view class="input_info">
				<input type="text" placeholder="请输入检索内容" placeholder-style="font-size:26rpx;color:#999999;" v-model="keyword" @confirm="getSearch">
				<image :src='STATIC_URL+"89.png"' mode="aspectFill"></image>
			</view>
			<view class="loading_css" v-if="isShow">
				<u-loading size="36" color="#1593FF"></u-loading>
				<view>加载中</view>
			</view>
			<template v-else>
				
				<view class="information_list">
					<template v-for="(item, index) in list">
						<information :item="item"></information>
					</template>
					
				</view>
				<view class="loadmore" v-if="last_page > 1">
					<u-loadmore font-size="24" :status="status" :icon-type="iconType" :load-text="loadText" />
				</view>
				<view class="noData" v-if="list.length == 0 && !isShow">
					<image :src='STATIC_URL+"no.png"'></image>
				</view>
			</template>
			
		</view>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	import information from "@/components/information/index.vue"
	export default {
		components: {
			information
		},


		data() {
			return {
				keyword: "",
				list: [],
				"page": 1,
				"is_pull": true,
				"last_page": 1,
				"status": 'loadmore',
				"iconType": 'flower',
				"loadText": {
					loadmore: '轻轻上拉',
					loading: '努力加载中',
					nomore: '我也是有底线的'
				},
				"isShow": true,
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {
			keyword() {
				if (!this.keyword) {
					this.page = 1;
					this.is_pull = true;
					this.isShow = true;
					this.getList();
				}
			}
		},
		onLoad(options) {
			this.getList();
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		// 下拉刷新
		onPullDownRefresh() {
			this.page = 1;
			this.is_pull = true;
			this.isShow = true;
			this.getList();
		},
		// 上拉加载
		onReachBottom() {
			if (this.page >= this.last_page) return;
			this.status = 'loading';
			this.page++;
			setTimeout(() => {
		
				if (this.page >= this.last_page) this.status = 'nomore';
				else this.status = 'loading';
				this.is_pull = false;
				this.getList();
			}, 500)
		},
		onPageScroll(e) {

		},
		methods: {
			// 我的资料列表  post65a8a097c9aef
			getList() {
				this.$api.post(global.apiUrls.post65a8a097c9aef, {
					kechengmingcheng: this.keyword,
					page: this.page
				}).then(res => {
					uni.stopPullDownRefresh();
					this.isShow = false;
					if (res.data.code == 1) {
						this.last_page = res.data.data.last_page;
						if (this.is_pull) {
							this.list = res.data.data.data;
						} else {
							this.list = this.list.concat(res.data.data.data);
						}
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			getSearch() {
				this.page = 1;
				this.is_pull = true;
				this.isShow = true;
				this.getList();
			},
		}
	};
</script>
<style lang="scss" scoped>
	.information_list {
		padding: 88rpx 32rpx 24rpx;
	}
	.input_info {
		width: 100%;
		padding: 24rpx 32rpx;
		position: fixed;
		background: #fff;
		z-index: 10;
	
		input {
			background: #F9F9F9;
			height: 64rpx;
			width: 100%;
			border-radius: 32rpx;
			padding-left: 64rpx;
			font-size: 26rpx;
		}
	
		image {
			width: 24rpx;
			height: 24rpx;
			position: absolute;
			left: 56rpx;
			top: 44rpx;
		}
	}
	.confirmOrder_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: #fff;
	}
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #fff;
		background-size: 100% auto;
	}

	.resultPayment_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background: url(https://app.ezsdcsm.com/images/91.png) no-repeat;
		background-size: 100% 100% !important;
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.resultPayment_fd0_1 {
		color: #fff;
		font-size: 36rpx;
		font-weight: 500;
		line-height: 50rpx;
	}

	.resultPayment_fd0_0_c0 {
		width: 20rpx;
		height: 36rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 0rpx 0rpx 0rpx 32rpx;
	}

	.resultPayment_fd0_0 {
		width: 100rpx;
		height: 88rpx;
	}

	.resultPayment_fd1_5 {
		font-size: 28rpx;
		color: #1593FF;
		width: 280rpx;
		height: 72rpx;
		line-height: 72rpx;
		margin: 33rpx 0rpx 112rpx 0rpx;
		border-radius: 44rpx;
		border: 1px solid #1593FF;
		background: #FFFFFF;
	}

	.resultPayment_fd1_4 {
		background: #1593FF;
		font-size: 28rpx;
		color: #fff;
		width: 280rpx;
		height: 72rpx;
		line-height: 72rpx;
		border-radius: 44rpx;
	}

	.resultPayment_fd1_3 {
		margin: 16rpx 0rpx 87rpx 0rpx;
	}

	.resultPayment_fd1_2_c1 {
		color: #666666;
		font-size: 28rpx;
		font-weight: 400;
		line-height: 40rpx;
	}

	.resultPayment_fd1_2_c0 {
		color: #666666;
		font-size: 28rpx;
		font-weight: 400;
		line-height: 40rpx;
		margin: 0rpx 10rpx 0rpx 0rpx;
	}

	.resultPayment_fd1_1 {
		color: #000000;
		font-size: 32rpx;
		font-weight: 700;
		line-height: 45rpx;
		margin: 40rpx 0rpx 30rpx 0rpx;
	}

	.resultPayment_fd1_0 {
		width: 250rpx;
		height: 180rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 88rpx 0rpx 0rpx 0rpx;
	}
</style>